package csel.model;

public abstract class TimedEffect implements Ticked, java.io.Serializable
{
	private static final long serialVersionUID = 1L;
	protected Entity e;

	public void enter(Entity e)
	{
		this.doEffect(e);
		ChronoTrigger.getInstance().addTicked(this);
		this.e = e;
	}

	public void leave(Entity e)
	{
		ChronoTrigger.getInstance().removeTicked(this);
		this.e = null;
	}

	protected abstract void doEffect(Entity e);
}
